<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>考试结果</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../../css/mui.min.css" rel="stylesheet" />
		<link href="../css/common.css" rel="stylesheet" />
    <style>
      .iconImg{
        width: 5rem;
        /* height: ; */
      }
      .container{
        height: 100vh;
      }
      .button button{
        width: 100%;
        text-align: center;
        line-height: 1.8rem;
      } 
       .button button.prev{
         color: #275EB1;
         border:1px solid #275EB1;
       } 
       .button button.next{
         color: #ffff;
         border:1px solid #275EB1;
         background-color: #275EB1;
       } 
    </style>
	</head>
	<body>
    <div class="container bg-white" id="container" v-cloak>
      <header class="mui-bar mui-bar-nav">
        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
        <h1 class="mui-title">考试结果</h1>
      </header>
      <div class="mui-content bg-white">
        <div class="padding text-center">
          <div class="padding margin-top-lg">
            <img src="../img/Failed.png" alt="" class="iconImg" v-if="!detail.pass">
            <img src="../img/pass.png" alt="" class="iconImg" v-else>
          </div>
          <div class="text-orange text-df padding">
            <span>本次考试得分 <span class="text-blue">{{detail.score}}</span>分（分数线 {{detail.passScore}}分） {{detail.passScore>detail.score?'很遗憾您未通过本次考试':'恭喜你，通过本次考试'}}</span>
          </div>
          <div class="button margin-top padding">
            <button class="next" style="color: #fff;" @click="back">返回首页</button>
            <button class="prev margin-top" @click="detailGet()">查看详情</button>
          </div>
        </div>
      </div>
    </div>
    <script src="../../../js/mui.min.js"></script>
    <script src="../../../js/vue.js"></script>
    <script src="../../../js/jquery-1.7.2.min.js"></script>
    <script src="../js/mkeyplus.base.js"></script>
    <script src="../formal/js/api.js"></script>
    <script type="text/javascript">
      var htapi = new HTGlobal();
      var user = JSON.parse(localStorage.getItem('outUser'));//当前用户信息
      var exam = null,cv=null;
      
      mui.plusReady(function() {
        cv = plus.webview.currentWebview();
        opener = cv.opener()
        opener.close('none');//关闭上一页面
        exam.detail = JSON.parse(cv.data);
        console.log(JSON.stringify(exam.detail))
      })
      exam = new Vue({
        el: '#container',
        data: {
          detail: {}
        },
        methods:{
          back(){
            mui.back();
          },
          detailGet(){
            var that=this;
            mui.openWindow({
              url: './examDetail.html',
              id: './examDetail.html',
              extras: {
                pageId: that.detail.id
              }
            });
          }
        }
      })
    
    </script>
	</body>
</html>
